
// 以下为定义时间格式的
// export const APP_DATE_FORMAT = 'DD/MM/YY HH:mm';
export const APP_DATE_FORMAT = 'YYYY-MM-DD HH:mm'
export const APP_TIMESTAMP_FORMAT = 'YYYY-MM-DD HH:mm:ss'
export const APP_LOCAL_DATE_FORMAT = 'DD/MM/YYYY'
export const APP_LOCAL_DATETIME_FORMAT = 'YYYY-MM-DDThh:mm'
export const APP_WHOLE_NUMBER_FORMAT = '0,0'
export const APP_TWO_DIGITS_AFTER_POINT_NUMBER_FORMAT = '0,0.[00]'
export const APP_DAY_FORMAT = 'YYYY-MM-DD'

// 创建组织字段
export const orgObj = {
  org_type: {
    'orderer': 'Orderer',
    'peer': 'Peer',
  },
  org_region: {
    'cn-huhehaote': '呼和浩特',
    'wuhan': '武汉',
    'beijing': '北京',
  },
  performance: {
    'basic': '标准版',
    'high-level': '高级版',
    'ecs.c5.large': '标准版',
    'STANDARD': '标准版',
    'ENTERPRISE': '企业版',
  },
  org_expiration: {
    1: '一个月',
    6: '半年',
    12: '一年',
  },
}

// 创建联盟字段
export const leagueObj = {
  con_consensus: {
    'raft': 'Raft',
  },
  con_region: {
    'cn-呼和浩特': '呼和浩特',
    'wuhan': '武汉',
    'beijing': '北京',
  },
  con_expiration: {
    1: '一个月',
    6: '半年',
    12: '一年',
  },
}

// 状态对应公共类名
export const STATUSCLASS = {
  'CREATING': 'common-ing',
  'SUCCESS': 'common-success',
  'FAILED': 'common-fail',
  'Running': 'common-success',
  'PENDING': 'common-ing',
  'TOBE_ACCEPTED': 'common-ing',
  'VOTING': 'common-ing',
  'ACCEPTED': 'common-ing',
  'ACCEPTED_PENDING': 'common-ing',
  'TOBE_ACCEPTED_PENDING': 'common-ing',
  'TOBE_ACCEPTED_FAILED': 'common-fail',
  'ACCEPTED_FAILED': 'common-fail',
}

export const LANG_OPS = process.env.REACT_APP_NODE_CC === 'enable' ? ['java', 'golang', 'node'] : ['java', 'golang', 'node'] // 'node',

export const STATUS = {
  'SUCCESS': {
    'tooltip': '运行中',
    'icon': require('@/images/fabric/yunhangzhong.svg'),
  },
  'ADDED': {
    'tooltip': '运行中',
    'icon': require('@/images/fabric/yunhangzhong.svg'),
  },
  'TOBE_ADDED': {
    'tooltip': '加入中',
    'icon': require('@/images/fabric/u5993.gif'),
  },
  'CREATING': {
    'tooltip': '创建中',
    'icon': require('@/images/fabric/u5993.gif'),
  },
  'FAILED': {
    'tooltip': '创建失败',
    'icon': require('@/images/fabric/error.svg'),
  },
  'FAIL': {
    'tooltip': '创建失败',
    'icon': require('@/images/fabric/error.svg'),
  },
  'PREPARE_BUILDING': {
    'tooltip': '加入中',
    'icon': require('@/images/fabric/u5993.gif'),
  },
  'PREPARE_SUCCESS': {
    'tooltip': '加入中',
    'icon': require('@/images/fabric/u5993.gif'),
  },
  'EXIT': {
    'tooltip': '退订成功',
    'icon': require('@/images/fabric/error.svg'),
  },
  'EXITING': {
    'tooltip': '退订中',
    'icon': require('@/images/fabric/u5993.gif'),
  },
  'STOP': {
    'tooltip': '暂停中',
    'icon': require('@/images/fabric/stop.svg'),
  },
}

// 证书状态
export const Certificate_Status = [
  { id: 'SUCCESS', text: '正常', checked: false, className: 'common-success' },
  { id: 'CREATING', text: '创建中', checked: false, className: 'common-ing' },
  { id: 'FAILED', text: '创建失败', checked: false, className: 'common-fail' },
  { id: 'UPDATING', text: '修改中', checked: false, className: 'common-ing' },
  { id: 'UPDATE_FAILED', text: '修改失败', checked: false, className: 'common-fail' },
  { id: 'CANCEL', text: '已注销', checked: false, className: 'common-warn' },
  { id: 'CANCELING', text: '注销中', checked: false, className: 'common-ing' },
  { id: 'CANCEL_FAILED', text: '注销失败', checked: false, className: 'common-fail' },
  { id: 'FROZEN', text: '已冻结', checked: false, className: 'common-warn' },
  { id: 'FROZEN_IN', text: '冻结中', checked: false, className: 'common-ing' },
  { id: 'FROZEN_FAILED', text: '冻结失败', checked: false, className: 'common-fail' },
  { id: 'UNFROZEN_FAILED', text: '解冻失败', checked: false, className: 'common-fail' },
  { id: 'UNFROZEN_IN', text: '解冻中', checked: false, className: 'common-ing' },
  { id: 'common-fail', text: '处理中', checked: false, className: 'common-ing' },
]

export const Peer_Status = [
  { id: 'CREATING', text: '创建中', checked: false, className: 'common-ing' },
  { id: 'RUNNING', text: '运行中', checked: false, className: 'common-success' },
  { id: 'READY', text: '就绪', checked: false, className: 'common-success' },
  { id: 'STOPPING', text: '已暂停', checked: false, className: 'common-warn' },
  { id: 'SUCCESS', text: '正常', checked: false, className: 'common-success' },
  { id: 'UPGRADING', text: '升级中', checked: false, className: 'common-warn' },
  { id: 'CONFIGURING', text: '配置中', checked: false, className: 'common-warn' },
  { id: 'FAILED', text: '失败', checked: false, className: 'common-fail' },
  { id: 'PROCESSING', text: '处理中', checked: false, className: 'common-warn' },
  { id: 'DELETED', text: '删除中', checked: false, className: 'common-warn' },
]

export const ACTIVATE_STATUS = 'ACTIVATE_STATUS'
export const TOKEN = 'BASS_TOKEN'
export const PUBLIC_KEY = 'PUBLIC_KEY'
export const USER_INFO = 'BASS_USER_INFO'
export const PERMISSION_LIST = 'BASS_PERMISSION_LIST'
